﻿
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System;

using System.IO;
using System.Collections.Generic;

using System.Data.SqlClient;
using System.Web.Services;

using System.Data;
using System.Configuration;
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.IO;
using System.Data.SqlClient;
using System.Drawing;
using System.Net.Mail;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using System.Configuration;
using System;
using System.Data;
using System.Data.SqlClient;
using System.Web.UI;
using System.Web.UI.WebControls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;


public partial class admin_view_task : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        SqlConnection conn = null;
        conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnStr"].ConnectionString);


        conn.Open();
        SqlCommand scmd = new SqlCommand("SELECT * FROM task where p_id='" + Session["w_id"] + "'", conn);

        SqlDataReader dr = scmd.ExecuteReader();
        if (dr.Read())
        {
            Label67.Text = dr[3].ToString();
            Label94.Text = dr[31].ToString();
            Label68.Text = dr[4].ToString();
            Label69.Text = dr[5].ToString();
            Label71.Text = dr[6].ToString();
            Label72.Text = dr[7].ToString();
            Label70.Text = dr[8].ToString();
            Label95.Text = dr[33].ToString();
            Label73.Text = dr[9].ToString();
            Label74.Text = dr[10].ToString();
            Label75.Text = dr[11].ToString();
            Label76.Text = dr[12].ToString();
            Label77.Text = dr[13].ToString();
            Label78.Text = dr[14].ToString();
            Label79.Text = dr[15].ToString();
            Label80.Text = dr[16].ToString();
            Label81.Text = dr[17].ToString();
            Label82.Text = dr[18].ToString();
            Label83.Text = dr[19].ToString();
            Label84.Text = dr[20].ToString();
            TextBox2.Text = dr[21].ToString();
            Label86.Text = dr[22].ToString();
            Label87.Text = dr[23].ToString();
            Label88.Text = dr[24].ToString();
            Label89.Text = dr[25].ToString();
            TextBox3.Text = dr[26].ToString();
            Label91.Text = dr[27].ToString();
            Label92.Text = dr[28].ToString();
            Label93.Text = dr[29].ToString();
            TextBox1.Text = dr[20].ToString();
            abc.Text = dr[32].ToString();
            lbltype.Text = "To Rent";




            if (Label81.Text == "בחר" || Label81.Text == "שדה למילוי עצמי")
            {
                Label81.Text = "-";
            }

            else
            {
                Label81.Text = dr[17].ToString();
            }








            if (Label87.Text == "בחר" || Label87.Text == "שדה למילוי עצמי")
            {
                Label87.Text = "-";
            }

            else
            {
                Label87.Text = dr[23].ToString();
            }




            if (Label67.Text == "בחר" || Label67.Text == "שדה למילוי עצמי")
            {
                Label67.Text = "-";
            }

            else
            {
                Label67.Text = dr[3].ToString();
            }




            if (Label70.Text == "בחר" || Label70.Text == "שדה למילוי עצמי")
            {
                Label70.Text = "-";
            }

            else
            {
                Label70.Text = dr[8].ToString();
            }





            if (Label78.Text == "בחר" || Label78.Text == "שדה למילוי עצמי")
            {
                Label78.Text = "-";
            }

            else
            {
                Label78.Text = dr[14].ToString();
            }



            if (Label82.Text == "בחר" || Label82.Text == "שדה למילוי עצמי")
            {
                Label82.Text = "-";
            }

            else
            {
                Label82.Text = dr[18].ToString();
            }


            if (Label86.Text == "בחר" || Label86.Text == "שדה למילוי עצמי")
            {
                Label86.Text = "-";
            }

            else
            {
                Label86.Text = dr[22].ToString();
            }



            if (Label88.Text == "בחר" || Label88.Text == "שדה למילוי עצמי")
            {
                Label88.Text = "-";
            }

            else
            {
                Label88.Text = dr[24].ToString();
            }



        }


        dr.Close();

    }

    protected void LinkButton1_Click(object sender, System.EventArgs e)
    {
        Session.Abandon();
        Response.Redirect("../admin.aspx");
    }


}